#include "RandomGenerator.h"

NahidaProject::RandomGenerator::RandomGenerator() noexcept {
	GetEngine().seed(std::random_device()());
}

NahidaProject::RandomGenerator::RandomGenerator(unsigned int seed) noexcept {
	GetEngine().seed(seed);
}


unsigned int NahidaProject::RandomGenerator::Next(unsigned int max) noexcept {
	return IntDistribution(0, max)(GetEngine());
}


int NahidaProject::RandomGenerator::NextInt(int min, int max) noexcept {
	return IntDistribution(min, max)(GetEngine());
}

double NahidaProject::RandomGenerator::NextDouble(double min, double max) noexcept {
	return RealDistribution(min, max)(GetEngine());
}

double NahidaProject::RandomGenerator::NextDouble() noexcept {
	return NextDouble(0.0, 1.0);
}